<?php
class Zendvn_Mail{	
	private $_config = array(		
			'auth'		=>'login',		
			'username' 	=> 'no_reply@artserv.org',		
			'password' 	=> 'fvu{ccg+A5g2', 		
			'smtp' 		=> 'p3plcpnl0455.prod.phx3.secureserver.net',
			'ssl' 		=> 'ssl',
			'port'		=> 465	
			);	
	
	public $_title 	= 'The International Artserv';	
	public $_from 	= 'no_reply@artserv.org';			
	public $_to 	= 'anhkhoa.nguyen2610@gmail.com';	
		
	public function __construct(){		
		
	}
	public function sendRegister($arrParam, $options = null){	
		$smtpHost 	= new Zend_Mail_Transport_Smtp ($this->_config['smtp'], $this->_config );		
		$mailTPL	= @file_get_contents(TEMPLATE_PATH . '/mail/email-register.html');
		$logo		= 'http://' . $_SERVER['HTTP_HOST']. TEMPLATE_URL . '/mail/images/mail-logo.png';
		
		$from		= $this->_from;		
		$name		= $arrParam['first_name'] . ' ' . $arrParam['last_name'];		
		$to			= $arrParam['email'];
		$subject 	= "IAS AUTO EMAIL";		
		

		$mailTPL	= str_replace('{logo}', $logo, $mailTPL);
		$mailTPL	= str_replace('{full_name}', $name, $mailTPL);
		
		$mail = new Zend_Mail('UTF-8');		
		$mail->setBodyHtml($mailTPL);		
		$mail->setFrom($from, 'The International Artserv');		
		$mail->addTo($to);		
		$mail->setSubject($subject);		
		$mail->isMultiPart();		
		return $mail->send($smtpHost);	
	}
}